package com.scf.contract.service.impl;

import com.scf.contract.entity.Borrowing;
import com.scf.contract.entity.Contract;
import com.scf.contract.mapper.ContractMapper;
import com.scf.contract.service.ContractService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author author
 * @create 2021-11-11-9:58
 */
@Service
public class ContractServiceImpl implements ContractService {
    @Resource
    ContractMapper contractMapper;
    @Override
    public List<Contract> selectAll() {
        return contractMapper.selectAll();
    }

    @Override
    public Contract getContractByBoid(int boid) {
        Contract contractByBoid = contractMapper.getContractByBoid(boid);
        return contractByBoid;
    }

    @Override
    public void addContract(Contract contract) {
        contractMapper.addContract(contract);
    }

    @Override
    public Borrowing getContractByBwid(int bwid) {
        Borrowing contractByBwid = contractMapper.getContractByBwid(bwid);
        return contractByBwid;
    }
}
